{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 原始形式"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 感知机原始形式\n",
    "def perceptron(X, y, eta):\n",
    "    w, b = np.zeros(X.shape[1]),0\n",
    "    while ((y*(w.dot(X.T)+b))<=0).any():\n",
    "        index = np.random.randint(X.shape[0])\n",
    "        if y[index]*(w.dot(X[index])+b) <= 0:\n",
    "            w = w + eta * y[index] * X[index]\n",
    "            b = b + eta * y[index]\n",
    "    def f(x):\n",
    "        return np.sign(w.dot(x)+b)\n",
    "    return w, b, f"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 把结果打印出来\n",
    "def plotModel(X, w, b, f):\n",
    "    for x in X:\n",
    "        if f(x) == -1:\n",
    "            plt.scatter(x[0],x[1], color='red')\n",
    "        else:\n",
    "            plt.scatter(x[0],x[1], color='blue')\n",
    "    line_x0 = np.array([1, 5])\n",
    "    if w[1] == 0:\n",
    "        line_x0 = [-b/w[0], -b/w[0]]\n",
    "        line_x1 = [-1, 3]\n",
    "    else:\n",
    "        line_x1 = np.array((-b - w[0]*line_x0) / w[1])\n",
    "    # plt.scatter(X[index,0],X[index,1], s=150, c='none', alpha=0.7, linewidth=1.5, edgecolor='#AB3319')\n",
    "    plt.plot(line_x0, line_x1)\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD4CAYAAAAJmJb0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2Z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Lgnfq3LOlczi+v2YciFfDuX+EHEfdAv/c/sVM2ud6MXD/1TuQOhZYDRf96yUucCHPQv/M38psB143Tl32P1yzh0AdgJHJ8FcAAPD/8R/ycyaxzgeb38G7gB+OMxxX/aqHHNB4vcqwgGvmdliMyuIcTyu349BDPlyf4h4gi0h9P4S7YBHgamJXNzMagOTgFudc7tKHo7xVxKyZ2XM5cueOee+d861J/TZxF3MrE2Ju/iyX+WYawaQ65xrC8ym+Bm0J8zsImC7c25xaXeLcZune1XOuRK6VyX0cM51BHoDN5jZWSWOx3XPghjySfkh4s65XZF/bjvn/gVUM7OGiVjbzKoRCtJxzrnJMe7iy56VNZefexZecwcwF7igxKGD+2VmVYG6JLCqO9xczrkvnXP7wlf/CnTyeJQeQF8zWw+MB/LN7J8l7uPHXpU5lw97Fb321vDX7YQ+Wa9LibvE9fsxiCE/Hfhp+DfUXYGdzrltfg9lZk0iXaSZdSG0918mYF0DngHWOOf+eJi7JXzPyjOXH3tmZo3MrF748lHAucCHJe42Hbg6fHkQMMeFf2Pm51wletu+hH7P4Rnn3HDnXLZzLpfQL1XnOOeuLHG3hO9VeeZK9F5FrVvLzLIil4HzgJJn5MX1+7FSn/HqBzN7gdBZFw0t9CHi9xL6JRTOuSeBfxH67fRaYC/w8ySZaxBwnZkdAL4FBnv9P3tYD+AqYEW4zwW4C2gRNZsfe1aeufzYs6bAs2ZWhdAPlYnOuZlmNhIodM5NJ/TD6R9mtpbQs9LBHs9U3rluNrO+wIHwXD9LwFw/kgR7VZ65/NqrY4Ap4ecuVYHnnXOzzOxa8Ob7UW9rICISYEGsa0REJEwhLyISYAp5EZEAU8iLiASYQl5EJMAU8iIiAaaQFxEJsP8HJKNbzbjh7zMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 书上的例子\n",
    "X = np.array([[3,3],[4,3],[1,1]])\n",
    "w, b, f = perceptron(X, np.array([1,1,-1]), eta=1)\n",
    "plotModel(X, w, b, f)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "打一份线性可分的数据\n",
    "我选择了skearn.datasets的iris数据第1类和第2类的后面两个特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAW8ElEQVR4nO3dfYwdV3nH8d8vdx3IBto68pbGdrwbqgjVRBSSlVuRKgRsUhNeQtVKTbogoEEua9JSUFvRWipqqkj9q0VVScqWui3y1qlESJum5TWAKC2BrKnzCgkmtcNihDcESlNXgM3TP2au9u71fZm9bzN77vcjje6dc+7MOTN/PB6fc/YZR4QAAOk6r+wOAACGi0APAIkj0ANA4gj0AJA4Aj0AJG6i7A60smXLlpiZmSm7GwCwYRw5cuSpiJhqVVfJQD8zM6OlpaWyuwEAG4btE+3qGLoBgMQR6AEgcQR6AEgcgR4AEkegB4DEEegBIHEEegAoYHFRmpmRzjsv+1xcLLtHxVVyHT0AVMniorRvn3T6dLZ/4kS2L0lzc+X1qyie6AGgiwMHVoN83enTWflGQKAHgC6efHJ95VVDoAeALnbsWF951RDoAaCLW2+VJifXlk1OZuUbQddAb/ug7VO2H25T/7u2j+bbw7bP2r4orztu+6G8jixlADakuTlpYUGanpbs7HNhYWNMxEqSu70c3PbVkp6R9MGIuLzLb18r6Z0R8Yp8/7ik2Yh4aj2dmp2dDbJXAkBxto9ExGyruq5P9BHxWUlPF2zrRkmH19E3AMCQDWyM3vakpL2S7mwoDkkft33E9r4ux++zvWR7aWVlZVDdAoCxN8jJ2NdK+veIaHz6v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HxKMld61SbFvShRHxjO1Nkj4n6R0RcV/JXasc2++SNCvpxyLiNWX3p6psH5c0GxEj/8OyZJ7oI+Kzkp4uux9VFxHfjIgv5d//R9KXJW0rt1fVE5ln8t1N+ZbGU9EA2d4u6dWSPlB2X9BeMoEe62d7RtJLJH2h3J5UUz4kcVTSKUmfiAju07neK+n3JP2o7I5sACHp47aP2N43yoYJ9GPK9nMk3SnptyPie2X3p4oi4mxEvFjSdkm7bDMk2MD2aySdiogjZfdlg7gqIq6Q9CpJb8+Hm0eCQD+G8jHnOyUtRsSHy+5P1UXEdyV9RtLekrtSNVdJel0+9nyHpFfYPlRul6orIk7mn6ck3SVp16jaJtCPmXyS8a8lfTki/rTs/lSV7SnbP5F/v0DSHklfKbdX1RIRvx8R2yNiRtINkj4VEW8ouVuVZPvCfPGDbF8o6VpJI1shmEygt31Y0uclvcD2su2byu5TRV0l6Y3Knr6O5tt1ZXeqgi6W9GnbD0q6X9kYPcsH0avnSfqc7QckfVHSv0TER0fVeDLLKwEArSXzRA8AaI1ADwCJI9ADQOII9ACQOAI9ACSOQA8AiSPQA0Di/h9h0FQQVflsbgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn import datasets\n",
    "\n",
    "iris = datasets.load_iris()\n",
    "X = iris.data\n",
    "y = iris.target\n",
    "\n",
    "X = X[y<2,2:]\n",
    "y = y[y<2]\n",
    "plt.scatter(X[y==0,0],X[y==0,1], color='red')\n",
    "plt.scatter(X[y==1,0],X[y==1,1], color='blue')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n",
       "       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n",
       "       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1,\n",
       "        1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,\n",
       "        1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,\n",
       "        1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y[y==0]=-1\n",
    "y"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "由于感知机要求的y的标签为-1和1，当前y的标签为0，1\n",
    "需要把标签0全部改成标签-1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD4CAYAAADvsV2wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3dd3hUVfoH8O+bSYHQJQFJAglNkC4ECy2BRAUU0F3byqq4smhABYRddPUn6q5rWZoNFStKbGsDg4C0hF4CghA6SOi9GyDt/f0x4RHYZCaZdu7MfD/Pc5/J3DNzzzuDvrk55z33iqqCiIgCX4jpAIiIyDeY8ImIggQTPhFRkGDCJyIKEkz4RERBItR0AGWJiorShIQE02EQEfmVVatWHVHV6NLaLJvwExISkJ2dbToMIiK/IiK5ZbVxSIeIKEgw4RMRBQkmfCKiIMGET0QUJJjwiYiCBBM+EVGQYMInIgoSTPhEROWQng4kJAAhIfbH9HTTEVWcZRdeERFZRXo6MGgQkJdnf56ba38OAP37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ArAExX1ZkmAgm4skwiIipdwJ3hExFR6ZjwiYiCBBM+EVGQYMInIgoSTPhEREGCCZ+IKEgw4RMRBYn/B6jlY8wU7gn6AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# iris数据\n",
    "w, b, f = perceptron(X, y, eta=0.01)\n",
    "plotModel(X, w, b, f)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
